package com.topcoder.srm517;

public class CompositeSmash {
	public String thePossible(int N, int target) {
		return possible(N, target) ? "Yes" : "No";
	}

	private boolean possible(int N, int target) {
		if (N == target) return true;
		if (N % target > 0) return false;
		boolean ok = true;
		for (int i = 2; i * i <= N; i++) {
			if (N % i == 0) {
				int j = N / i;
				if (!possible(i, target) && !possible(j, target)) {
					ok = false;
					break;
				}
			}
		}
		return ok;
	}
}
